package com.guet.niit.Admin.controller;

import com.guet.niit.Admin.service.UserService;

import java.util.Scanner;

public class UserController {
    public static void userMenu(){
        System.out.println("----------------");
        System.out.println("---1.用户添加---");
        System.out.println("---2.删除用户---");
        System.out.println("---3.更改用户---");
        System.out.println("---4.用户查询---");
        System.out.println("----------------");
        Scanner scanner = new Scanner(System.in);
        int option = scanner.nextInt();
        switch (option){

            //用户添加
            case 1:
                UserService userService = new UserService();
                userService.userAdd();
                break;
            //删除用户
            case 2:
                UserService userService1 = new UserService();
                userService1.userDelete();
                break;
            //更改用户
            case 3:
                UserService userService2 = new UserService();
                userService2.userModify();
                break;
            //用户查询
            case 4:
                UserService userService3 = new UserService();
                userService3.userInquire();
                break;
        }
    }
}
